home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 33 / 033.d81 / cw trainer (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  4KB  |  129 lines

  1. 100 dim n1(50), cw$(50), dur(50,8),bb(510)
  2. 150 poke53281,6:poke53280,11:poke646,15
  3. 160 sp$=" ":printchr$(142)
  4. 200 gosub60000
  5. 300 goto6000
  6. 400 for l=54272to54296:pokel,0:nextl
  7. 500 s=54272:pokes+5,15:pokes+24,15:pokes+6,40
  8. 600 pokes+21,57:pokes+22,100:pokes+23,8
  9. 650 print"[147]each practice session lasts for"
  10. 660 print"two minutes."
  11. 700 print"suggested code speeds are from 2 to 15"
  12. 710 print"words per minute"
  13. 800 input"what code speed do you wish?";speed
  14. 801 ifsp<2orsp>15thenprint" please enter a value between 2 and 15.":goto800
  15. 900 number=int(speed*10.)
  16. 910 ifspeed>4then950
  17. 920 ss=4:ts=45:su=2800:goto1000
  18. 950 ifspeed>10then980
  19. 960 ss=6:ts=65:su=1000:goto1000
  20. 980 ss=5:ts=60:su=1250
  21. 1000 gosub 3500
  22. 1050 poke53280,6:poke53281,5:poke646,0
  23. 1100 print"[147]get ready--code practice begins in                 5 seconds"
  24. 1105 print:print"     [press 'q' to exit practice]":print
  25. 1200 for tt=1to2000:nexttt
  26. 1250 gosub1400
  27. 1260 printchr$(13);"practice this group again (y/n)"
  28. 1270 poke198,0:wait198,1:getan$:ifans$="y"then900
  29. 1280 ifans$="n" goto300
  30. 1290 goto 1270
  31. 1310 :
  32. 1400 :
  33. 1450 li=1:ag=number:rem       ifsv=9orsv=10thenag=ag-30
  34. 1500 foria=1toag
  35. 1600 ib=bb(ia):ifli+len(cw$(ib))>38thenprint:li=1
  36. 1610 printcw$(ib);sp$;:li=li+len(cw$(ib))+1
  37. 1700 foric=1ton1(ib)
  38. 1750 ifpeek(198)<>0thengetx$:ifx$="q"thenreturn
  39. 1800 forid=1to7*dur(ib,ic)*ss/speed
  40. 1900 pokes,31:pokes+1,21:pokes+3,8:pokes+2,0:pokes+4,65:next
  41. 2000 forid=1tots/speed:pokes+4,64:nextid
  42. 2100 nextic
  43. 2200 foric=1tosu/speed:nextic
  44. 2300 nextia
  45. 2350 return
  46. 2800 :
  47. 2900 for i=1to42
  48. 3000 readn1(i),cw$(i)
  49. 3100 for j=1ton1(i)
  50. 3200 read dur(i,j)
  51. 3300 nextj:nexti
  52. 3400 return
  53. 3500 :
  54. 3600 fori=1tonumber
  55. 3700 bb(i)=int(rnd(0)*nr)+sw
  56. 3800 nexti
  57. 3900 return
  58. 4100 data 1,e,1,2,i,1,1,1,t,3,2,m,3,3,2,a,1,3,2,n,3,1
  59. 4200 data 3,d,3,1,1,3,g,3,3,1,3,k,3,1,3,3,o,3,3,3,3,r,1,3,1
  60. 4250 data 3,s,1,1,1,3,u,1,1,3,3,w,1,3,3,4,b,3,1,1,1
  61. 4300 data 4,c,3,1,3,1,4,f,1,1,3,1,4,h,1,1,1,1,4,j,1,3,3,3
  62. 4350 data 4,l,1,3,1,1,4,p,1,3,3,1,4,q,3,3,1,3,4,v,1,1,1,3
  63. 4400 data 4,x,3,1,1,3,4,y,3,1,3,3,4,z,3,3,1,1,5,1,1,3,3,3,3,5
  64. 4500 data 2,1,1,3,3,3,5,3,1,1,1,3,3,5,4,1,1,1,1,3,5,5,1,1,1,1,1
  65. 4600 data 5,6,3,1,1,1,1,5,7,3,3,1,1,1,5,8,3,3,3,1,1,5,9,3,3,3,3,1,5
  66. 4700 data 0,3,3,3,3,3,6,period,1,3,1,3,1,3,6,comma,3,3,1,1,3,3,6
  67. 4800 data?mark,1,1,3,3,1,1,5,slash,3,1,1,3,1,8,goof,1,1,1,1,1,1,1,1,1," ",0
  68. 4900 open15,8,15,"r0:hello connect=hello connect":input#15,er:close15
  69. 4910 print"[147]";:ifer<>63thenend
  70. 4920 load"hello connect",8
  71. 6000 :
  72. 6040 :
  73. 6080 :
  74. 6085 poke53280,6:poke53281,5:poke646,0
  75. 6090 print"[147]            cw trainer menu:"
  76. 6100 print"choose from an item below:"
  77. 6110 print:    rem   fori=1to2500:nexti
  78. 6120 print"1. practice on letters: a,e,i,m,n,t"
  79. 6140 print"2. practice on letters: d,g,k,o,r"
  80. 6160 print"3. practice on letters: b,s,u,w"
  81. 6180 print"4. practice on letters: c,f,h,j"
  82. 6200 print"5. practice on letters: l,p,q,v"
  83. 6220 print"6. practice on letters: x,y,z"
  84. 6240 print"7. practice on numbers: 1 through 5"
  85. 6260 print"8. practice on numbers: 6 through 0"
  86. 6280 print"9. practice on punctuation:  period,"
  87. 6290 print"comma, ? mark, slash, goof (error)"
  88. 6300 print"10. random practice on all of the above"
  89. 6320 print"11. quit for now (return to loadstar)":print
  90. 6340 input"which do you want";sv$:sv=val(sv$)
  91. 6345 ifsv<1orsv>11thenprint"[145]";:goto6340
  92. 6360 onsvgoto6400,6450,6500,6550,6600,6650,6700,6750,6800,6850,4900
  93. 6400 sw=1:sx=6:nr=6:gosub3500:goto400
  94. 6450 sw=7:sx=11:nr=5:gosub3500:goto400
  95. 6500 sw=12:sx=15:nr=4:gosub3500:goto400
  96. 6550 sw=16:sx=19:nr=4:gosub3500:goto400
  97. 6600 sw=20:sx=23:nr=4:gosub3500:goto400
  98. 6650 sw=24:sx=26:nr=3:gosub3500:goto400
  99. 6700 sw=27:sx=31:nr=5:gosub3500:goto400
  100. 6750 sw=32:sx=36:nr=5:gosub3500:goto400
  101. 6800 sw=37:sx=41:nr=5:gosub3500:goto400
  102. 6850 sw=1:sx=41:nr=41:gosub3500:goto400
  103. 60000 rem
  104. 60010 rem--subrutine to initialize screen and start program
  105. 60030 rem
  106. 61000 print"[147]morse code training program"
  107. 61020 print"by terry m. brown"
  108. 61060 print"";spc(25);"[144][162][162][162][162][162][162][162][162][162]"
  109. 61080 printspc(29);" [146]"
  110. 61100 printspc(12);"[169]                   [146]"
  111. 61120 printspc(8);"[187][172][146]     [146]          [223][169]"
  112. 61140 print"[168][168][168][168][168][168][168][168][144][190][188][146] [169]   [223][146]         [169][223][146]"
  113. 61160 printspc(7);"                         [146]"
  114. 61180 print"[158]morse code key"
  115. 61200 gosub2800
  116. 61220 data 4,10,11,12,1,42,16,10,7,1,42,2,12,42,17,13,6
  117. 61240 number=17
  118. 61250 speed=7
  119. 61260 fori=1tonumber
  120. 61280 readbb(i)
  121. 61300 nexti
  122. 61400 for l=54272to54296:pokel,0:nextl
  123. 61500 s=54272:pokes+5,15:pokes+24,15:pokes+6,40
  124. 61600 pokes+21,57:pokes+22,100:pokes+23,8
  125. 61650 print"";spc(10);
  126. 61700 printtab(15)"press a key"
  127. 62700 poke198,.:wait 198,1:poke198,.
  128. 63000 return
  129.